{{- range $ipaddressPool := .Values.metallb.addressPools }}
  {{ if eq $ipaddressPool.protocol "layer2" }}
---
apiVersion: metallb.io/v1beta1
kind: L2Advertisement
metadata:
  name: {{ $ipaddressPool.name }}
  namespace: d8-{{ $.Chart.Name }}
  {{- include "helm_lib_module_labels" (list $ (dict "app" "speaker")) | nindent 2 }}
spec:
  ipAddressPools:
  - {{ $ipaddressPool.name }}
  {{- end }}
{{- end }}
